#!/usr/bin/env python
import os

if __name__ == '__main__':
    for root, dirs, files in os.walk('.'):
        for dir in dirs:
            if dir.startswith("."):
                dirs.remove(dir)

        for file in files:
            if file.endswith('.pyc') or file.endswith('.log'):
                os.remove(os.path.join(root,file))

